-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for PipelineRun minimal embedded status #1617
Add support for PipelineRun minimal embedded status #1617
Conversation
b14234f
to
ba09bb1
Compare
/retest |
@vinamra28 please take a look 🙏🏾 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
ba09bb1
to
a00e153
Compare
ping @vinamra28 @chmouel and anyone else from @tektoncd/cli-maintainers =) |
/retest |
a00e153
to
5b4237f
Compare
pkg/cmd/pipelinerun/logs_test.go
Outdated
}, | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be we can remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! I missed that - thanks for catching it!
return &pr, nil | ||
} | ||
|
||
// getFullPipelineTaskStatuses returns populated TaskRun and Run status maps for a PipelineRun from its ChildReferences. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
5b4237f
to
082787a
Compare
082787a
to
7123767
Compare
/retest |
2 similar comments
/retest |
/retest |
/lgtm |
# Re-run the PipelineRun tests with "embedded-status" set to "minimal" | ||
header "Running Go e2e tests with Pipeline embedded-status set to minimal" | ||
|
||
set_minimal_embedded_status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep testing the old behaviour too? Not sure how though, I guess that would mean an extra e2e job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are still testing that - we're running the full set of tests with the default (full
), and then updating the flag to minimal
and rerunning the relevant tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided it wasn't worth adding an additional job given how few tests actually change behavior depending on the embedded-status
value - it was markedly simpler and faster to get what we needed by just doing it this way. =)
Fixes tektoncd#1618 Signed-off-by: Andrew Bayer <[email protected]>
7123767
to
41cbf03
Compare
/test pull-tekton-cli-unit-tests |
/lgtm |
Changes
fixes #1618
This is a dependency for tektoncd/pipeline#4954
Starting in Pipeline v0.35.0, we support a new approach to embedding
TaskRun
andRun
statuses inPipelineRun.Status
, as described in TEP-0100. When theembedded-status
feature flag is set tominimal
, thePipelineRun.Status.TaskRuns
andPipelineRun.Status.Runs
fields aren't populated. Instead, a new field,PipelineRun.Status.ChildReferences
is populated with a list of the API version, kind, name, andPipelineTask
name for eachTaskRun
orRun
in thePipelineRun
, requiring anything trying to see the status of the children of aPipelineRun
to fetch those statuses directly.Until Pipeline v0.44.0, the default value for the
embedded-status
feature flag isfull
, continuing the previous full embedded status behavior, but in v0.44.0, the default will beminimal
, and in v0.45.0, the feature flag will go away, and the minimal embedded status will always be used. Therefore, the CLI needs to add support for minimal embedded status ASAP.This change uses a helper function added in Pipeline v0.36.0 (which is just copied into the CLI code for now due to Chains not being compatible with Pipeline v0.36.0) to take a
PipelineRun
, check if it already has the deprecatedTaskRuns
andRuns
maps populated (which will be the case for Pipeline pre-v0.35.0, and later Pipeline versions if theembedded-status
feature flag is eitherfull
orboth
), returning those maps if they are populated, and otherwise generating those maps from thePipelineRun
'sChildReferences
and returning the resulting maps. The functions used in the CLI to fetchPipelineRun
s will now call that helper function and setPipelineRun.Status.TaskRuns
andPipelineRun.Status.Runs
to the output of that function, ensuring that no other code changes should be needed in the CLI until those fields are removed./kind feature
/kind tep
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make check
make generated
See the contribution guide
for more details.
Release Notes